Method and apparatus for downloading executable code in a non-disruptive manner

ABSTRACT

A method and apparatus for achieving a non-disruptive code load that includes assigning an endpoint to a non-disruptive code loading new process, loading the process into a memory location of a system and starting the process, wherein a previous process is instructed to forward all messages on its queue to the new process to where all new signals are processed.

FIELD OF THE INVENTION

[0001] The present invention relates generally to downloading software code onto a computer hardware device. More particularly, the present invention relates to downloading software code to an active hardware device, which is part of the system, such that the active hardware device is available to the rest of the system, all the time and hence software upgrade does not disrupt the system operation.

BACKGROUND OF THE INVENTION

[0002] The field of computer technology advances at almost a lightening pace. Equipment rarely has more than a five-year life. In most instances, the life is only two to three years. In some instances, it is possible to replace various pieces of the equipment. In other instances, all that is required is an upgrade of the firmware or software. The problem arises when other system devices communicating with the system device being upgraded, cannot tolerate even few milliseconds of unavailability of the system device, under upgrade. Failure to do so, may results in system failure and hence significant down time. Computer equipment owners demand near perfect operation of their equipment. Owners talk in terms of anything less than 99.999% availability as being unacceptable.

[0003] Shutting down a computer system can cost a company thousands and thousands of dollars for each hour the system remains unavailable. Upgrades of computer equipment usually result in some downtime of the processing. This has resulted in technology assistants upgrading equipment at odd hours of the morning. This results in additional costs to the company as well.

[0004] Software upgrades on larger computer systems are needed to add additional features or fix reoccurring problems or bugs. In light of the financial consequences of shutting down a computer, there is a need to upgrade firmware without disrupting the processing time. Prior systems involve halting the real-time system, while the upgrade in code is performed, which may require halting the complete system due to other system devices requiring immediate response from the system device under upgrade. This is not ideal for the aforementioned reasons. Furthermore, the owner of the equipment is less reluctant to perform upgrades or fix bugs unless absolutely necessary.

[0005] Accordingly, it is desirable to provide an apparatus and method that enables the owner of computer systems to upgrade the software of one of their devices to add new features or fix software bugs, in a way so that the device being upgrade is always available to other system devices. This in turn will allow the computer system to run or operate in real time and continue to process requests.

SUMMARY OF THE INVENTION

[0006] It is therefore a feature and advantage of the present invention to provide a method and apparatus for downloading a new version of executable software code onto a system without the need to bring the system to a halt.

[0007] It is another feature and advantage of the present invention to provide a fast and efficient means of processing time to upgrade a process or thread.

[0008] The above and other features and advantages are achieved through the use of a novel endpoint identification tag that is attached to every process, an endpoint process table that permits all processes to communicate with each other, and to enable the new process to eventually replace the previous process as herein disclosed. It is important to note that new process and the previous process it replaces have the same endpoint.

[0009] In accordance with one embodiment of the present invention, a method for non-disruptive code loading includes the steps of loading a new process into memory, wherein the new process includes an endpoint (same as the process it is replacing), starting the new process and creating an identifier for the new process.

[0010] A further step to this method can include recording of the identifier by a downloader, whereby a control process eventually requests and obtains the new process identifier. The identifier is used to enable the previous process and the new process to communicate to one another. The inclusion of an identifier and an endpoint for the new process results in the building of an endpoint lookup table, which results in the step of looking up the endpoint of the process to enable processes to communicate with each other.

[0011] In a further aspect of this embodiment, a previous process sends or transmits update signals to the new process to update its internal database. These signals include the process identification numbers among other information to enable the new process to execute and operate as the previous process. While the update signals are being transmitted, the previous process continues to process and service requests that are received on the queue of the previous process. Once the complete database has been sent, the step of alerting the control process about the completion of transmission of the database is accomplished. Further steps include forwarding any remaining requests to the new process queue, in response to the database being transferred, and processing update signals received by the new process queue. When the new process begins to execute and process all the requests for the system, the previous process can be deleted or removed to help alleviate any memory problems that might occur.

[0012] In another aspect of this invention, the update signals transferred between the new and previous process remain approximately the same between code revisions.

[0013] In an alternate embodiment of the present invention, an apparatus for loading code non-disruptively includes means for loading a new process into memory, wherein the new process comprises an endpoint, means for starting the new process and means creating an identifier for the new process. This alternate embodiment can further include means for recording the identifier by means for downloading and means for obtaining the identifier for a control process.

[0014] In another aspect of this alternate embodiment, additional elements are means for instructing a previous process to perform a non-disruptive switchover to the new process, which is accomplished by a control process. At the instruction to perform a non-disruptive switchover, means for transmitting communicates the identifier to the new process. After some further communication between the new and previous process, means for notifying instructs the control process that the database has been transferred to the new process. Once the endpoint lookup table is updated by replacing the endpoint entry, containing the identification number of the previous process with the identifier of the new process, all communication from other processes are directed to the new process. This is transparent to the other processes, since they send the message to the same end point.

[0015] Once the new process is activated, the previous process instructs means for forwarding to transmit any remaining messages to a queue of the new process, where the new process begins to process requests.

[0016] In a further embodiment of this invention, an apparatus for loading code non-disruptively includes an operating system that generates an identifier for a new process, wherein the new process includes an endpoint, a memory device linked to the operating system, wherein the memory device receives the new process, a lookup table that includes both the identifier and endpoint of the new process, wherein the lookup table is in communication involving other processes. The controller or control process informs a previous process to perform a non-disruptive switchover to the new process. The apparatus can further include a downloader linked to the memory device, wherein the new process is received by the downloader and placed in the memory device.

[0017] In another aspect of this embodiment, signals are sent between the old process and the new process. The signal can include the database of the previous process and the identifier of the new process.

[0018] Once the database is transferred to the new process, the control process is alerted to this occurrence. In the endpoint lookup table, an identification number entry for the previous process's end point is replaced by the new process's identification number.

[0019] There has thus been outlined, rather broadly, the more important features of the invention in order that the detailed description thereof that follows may be better understood, and in order that the present contribution to the art may be better appreciated. There are, of course, additional features of the invention that will be described below and which will form the subject matter of the claims appended hereto.

[0020] In this respect, before explaining at least one embodiment of the invention in detail, it is to be understood that the invention is not limited in its application to the details of construction and to the arrangements of the components set forth in the following description or illustrated in the drawings. The invention is capable of other embodiments and of being practiced and carried out in various ways. Also, it is to be understood that the phraseology and terminology employed herein, as well as the abstract, are for the purpose of description and should not be regarded as limiting.

[0021] As such, those skilled in the art will appreciate that the conception upon which this disclosure is based may readily be utilized as a basis for the designing of other structures, methods and systems for carrying out the several purposes of the present invention. It is important, therefore, that the claims be regarded as including such equivalent constructions insofar as they do not depart from the spirit and scope of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

[0022]FIG. 1 is a block diagram illustrating several elements of a preferred embodiment of the present invention.

[0023]FIG. 2 is a diagram illustrating specific elements of the preferred embodiment.

[0024]FIG. 3 is a block diagram of an alternate embodiment of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION

[0025] A preferred embodiment of the present invention provides an apparatus for downloading executable code to a system device and running or executing it after download, in a manner that the system device being upgrade is always available to other system devices. This allows the system to continue to operate without the need to sacrifice valuable processing time.

[0026] A general operating system supports multithreads of execution to create a multi-tasking environment. The operating system OSE from Enea of Sweden refers to these multi-threads as processes. OSE operating system categorizes processes into categories such as dynamic, and static. The dynamic process, supported by OSE, is a focal point of this invention. The dynamic process, according to OSE, is a process that can be dynamically created and then destroyed. In other words, it is possible to create or spawn a process and then at a later point in time delete this process.

[0027] The present invention focuses on two types of dynamic processes, (i) loadable; and (ii) persistent. This invention does not allow persistent process to be non-disruptively loaded and started. All OSE processes are persistent. User processes can be loadable or persistent. On the other hand, loadable processes are capable of being non-disruptively loaded and started. The following is a breakdown of the hierarchy of the processes:

[0028]FIG. 1 is a block diagram illustrating several elements of a preferred embodiment of the present invention. A new or upgraded process 102 is compiled outside of the system 104. The new process 102 is comprised with an endpoint 108 (same as an endpoint of previous process 118) and a database 106. The endpoint 108 is in addition to the process identification that is generated by the operating system executable code 110. In the present invention the operating system executable code 110 can be the OSE operating system.

[0029] The new process 102 is downloaded into the system 104 via the downloader 112 to eventually replace process A 118. In the present invention, the downloader 112, can be the dynamic program-loading feature of OSE. The downloader 112 allows a user to load the new process 102 or code into memory 114 without disrupting currently running processes.

[0030] Any process loaded or currently located in the OSE operating system is identified by its identifier or process ID code. The identifier is a unique number to identify a particular process. The identifier is assigned and created by the OSE operating system when the process is loaded and executed into the system device 104. The identifier cannot be user specified.

[0031] In the OSE operating system, each process has one input queue to receive signals. The signal is a message containing information that usually results in work for the process. In other words, the signal is a request for the process to perform a certain function. Since there is only one input queue to receive signals, there is only one input queue per process. The same identifier is also used to identify the input queue of a process.

[0032] The current invention places an additional layer on top of the OSE operating system's identifier to identify processes and queues. This layer is labeled as an endpoint 108. The endpoint 108 is created at the time the new process 102 is compiled and not by the OSE operating system or the operating system executable code 110. The endpoint 108 enables the previous processes 118, 120, 122 to communicate with one another. The endpoint 108, as an identifier, is unique for a given process, but is similar if not the same for previous and new versions of the process. The similarity of the endpoints ensures seamless upgrading of the process. Processes already resident in the system are not required to obtain a new endpoint for the upgraded process. One of the differences between the identifier and the endpoint 108 is that the endpoint 108 is determined at compile time rather than at runtime and the identifier is generated at runtime.

[0033] The OSE processes and the new process 102 communicate with each other through the use of the identifier. It is not necessary to alter this communication mechanism because the OSE processes are not capable of being non-disruptively upgradeable. Furthermore, if an OSE process communicates to a new process 102 on a regular basis, that new process 102 becomes persistent and then is unable to be non-disruptively upgraded. In the present invention, only a small percentage of the previous processes 120, 122 are or become persistent. As mentioned before, new process 102 will eventually replace process A 118.

[0034] The new process 102 includes a database 106 and an endpoint 108. The database 106 can be initially set at the default setting or can be left blank. The new process 102 is received by the downloader 112, which is part of the system 104. The downloader 112 places the new process 102 into memory 114. At this point, the process 102 is started or executed by the OSE operating system 110. Additionally, the OSE operating system 110 generates an identifier with the ID generator 116.

[0035] The new process 102 is loaded into memory 114 where it is then executed to eventually replace or upgrade the previous process A 118. As stated previously, the new process 102 includes an endpoint 108, which is generated at compile time of the executable code, and a database 106 that is initially non-existent, set to a default setting or empty.

[0036] Once the new process 102 is loaded into memory 114, the ID generator 116 of the operating system 110 generates an identifier for the new process and placed into the database 106. A non-disruptive code load (NDCL) control process 124 or controller then communicates to the downloader 112 to obtain a list of new identifiers. The NDCL control process 124 informs previous process A 118 to perform a non-disruptive switchover to the new process 102. Contained in this signal payload is the identifier of the corresponding loadable new process 102. The passing or communicating of the identifier of the new process 102 to the previous process 118 allows these two processes to communicate with each other directly without the need to update the endpoint lookup table.

[0037] The previous process 118 transmits data to the new process 102 to enable the new process 102 to update its database 106. In the present invention, these update signals are not altered during code revisions. This enables the update signals to be translated by any version of new process.

[0038] The new process 102, upon receiving the update signals, updates its database 106. During this period of time, the new process 102 does not receive any requests from other sources to perform certain functions. The previous process 118 continues to service and process new requests as it sends update signals to the new process 102. Furthermore, the previous process 118 sends new update signals as its own internal database 126 is altered or changed from new requests from other processes.

[0039] Once the previous process A 118 has completed the database transfer, the previous process A alerts the NDCL control process 124. At this point in time, the database 106 of the new process 102 is sufficiently similar to the database 126 of the previous process 118 such that the new process can seamlessly function as the previous process. The NDCL control process 124 then proceeds to update an endpoint lookup table 130 with the identifier of the new process 102 replacing the identifier 128 of the previous process A 118. Furthermore, the previous process A 118 forwards any remaining work on its queue to the new process 102. From this point forward, all new work or requests are being directed to the new process 102. The previous process A 118 can be deleted to free additional memory in the system 104. As previously stated, the endpoint 108 for the previous process 118 and new process 102 remains similar if not identical through an upgrade. The endpoint lookup table 130 completes the conversion for other processes to communicate with the upgraded process. In other words, the processes already resident in a system specify an upgradeable process by a known endpoint 108. This request to communicate with the other process by identifying the endpoint is then received by the endpoint lookup table 130, which in turn identifies the new process 102 by its identifier. The step of updating the process identifier in the endpoint lookup table for an upgraded process bypasses each process having to know the process identifier of pervious and new processes as well as ensuring a fast and efficient means for a nondisruptive code load.

[0040] Note that it is possible for processes to be in a different formats because of differing code versions. However, these processes are still able to communicate with each other. The new process 102 is both forward and backward compatible with the differing code revisions in order to communicate and transfer data.

[0041]FIG. 2 is a diagram illustrating the specific elements of the preferred embodiment. Consider a running system that includes both persistent and loadable processes running. All processes are communicating to each other by the use of signals being placed on their receive queues. The OSE operating system identifies queues by their identifier. The present invention places an additional identification layer on top of the OSE operating system identifier to enable processes to identify specific processes and queues. This new layered identification is called an endpoint 108 and is the way processes, loadable and persistent, communicate with each other.

[0042] If an existing process A 202 needs to send a message to an existing process B 204, then process A 202 specifies the endpoint 108 of process B 204. The process A 202 proceeds to lookup the endpoint 108 in the endpoint lookup table 130. Once the endpoint 108 of process B 204 is discovered, the endpoint 108 is translated into a process identifier and then the message from process A 202 is routed to the process B 204. The endpoint lookup table 130 is comprised of all the identifiers for the processes. The endpoint lookup table 130 allows processes to free up memory space by letting one central location store the common information. This centralization is also useful for updating such that only one table needs to be updated and thus there are no race conditions. In FIG. 2, the endpoint 108 of process A 202 is not the same endpoint 108 of process B 204. FIG. 2 illustrates the preferred embodiment of communication between two loadable processes.

[0043]FIG. 3 is a block diagram of an alternate embodiment of the present invention. FIG. 3 is a block diagram illustrating a method of the present invention. This alternate embodiment is begun with the step 302 of loading a new process 102 into memory 114. The new process contains at the minimum an endpoint 108. The next step 304 involves starting or executing the new process 102. At this point, the new process 102 is present in memory 114 but not processing requests or messages. The OSE operating system 110 initiates the step 306 of creating an identifier for the new process 102 once the new process 102 or executable code is loaded into memory 114.

[0044] Once loaded into memory 114, an NDCL control process 124 begins the step 308 of communicating with the downloader 112 to obtain the identifier of any and all new processes 102. The NDCL control process 124 performs the step 310 of informing the previous process 118 to initiate a switchover the new process 102. After the previous process 118 receives this request, the previous process 118 begins the step 312 of transmitting data to the new process 102. The data can be the internal database 126 of the previous process 118. The new process 102 uses this data to update its database 106 in preparation for replacing the previous process 118. Once all the data has been transmitted by the previous process 118, the previous process 118 performs the step 314 of informing the NDCL control process 124 that the database has been transferred. In response, the NDCL control process 124 executes the step 316 of updating the endpoint look table 130 with the endpoint 108 of the new process 102. After which, NDCL control process 124 informs pervious process 118 to forward all remaining requests on its queue to new process 102. Previous process 118 executes step 317 and carries out the fowarding of all pending requests on its queue to the new process 102. At this point, the new process 102 begins the step 318 of processing all requests. The NCDL control process 124 can perform the step 320 of removing the previous process 118 from memory 114.

[0045] It is also contemplated by the present invention to upgrade interrupt handlers in a non-disruptive fashion. This is possible because the interrupt handlers are called or retrieved from a vector table. The current implementation of OSE requires that during the upgrade of the interrupt handlers that the interrupts be disabled when changing the function point in the vector table. The preferred embodiment implements the upgrading of interrupts by disabling the interrupts. However, the invention is not limited to such a configuration. One of ordinary skill in the art recognizes that it is possible to implement the present invention without the need to disable interrupt. With the present invention, this period of time when the interrupts are disabled is exceedingly fast, less than 500 microseconds. During this time, the hardware interrupts are stacked. When the interrupt handlers are upgraded, the interrupts are handled by the new handlers. The interrupt handlers do not have internal databases, so there is no need to synchronize old and new code.

[0046] The many features and advantages of the invention are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the invention, which fall within the true spirits, and scope of the invention. Further, since numerous modifications and variations will readily occur to those skilled in the art, it is not desired to limit the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope of the invention. 

What is claimed is:
 1. A method for non-disruptive code loading, comprising the steps of: loading a new process into memory, wherein the new process comprises an endpoint; starting the new process; and instructing a previous process to perform a non-disruptive switchover to the new process.
 2. The method as in claim 1, further comprising the step of recording the identifier by a downloader.
 3. The method as in claim 2, further comprising the step of obtaining the identifier for a control process.
 4. The method as in claim 1, wherein the step of instructing the previous process is accomplished with the control process.
 5. The method as claim 4, wherein the step of instructing the previous process to perform the non-disruptive switchover to the new process further includes transmitting the identifier to the new process.
 6. The method as in claim 5, further comprising sending signals from the previous process to the new process.
 7. The method as in claim 6, wherein the previous process communicates with the new process by means of process identifier
 8. The method as in claim 6, wherein the signal requires updating a database of the new process.
 9. The method as in claim 8, wherein the previous process continues to process and service signals received on a previous process queue.
 10. The method as in claim 6, further including the step of notifying the control process that the database has been transferred to the new process.
 11. The method as in claim 10, further including the step of updating the endpoint lookup table with the identifier of the new process.
 12. The method as in claim 10, further including the step of forwarding any remaining messages to a new process queue, in response to the database being transferred.
 13. The method as in claim 12, further including the step of processing signals by received by the new process queue.
 14. The method as in claim 12, further including the step of deleting the previous process from memory.
 15. The method as in claim 7, wherein the signal requiring updating the new process database is not upgraded and remains approximately the same.
 16. An system for loading code non-disruptively, comprising: means for loading a new process into memory, wherein the new process comprises an endpoint; means for starting the new process; and means for instructing a previous process to perform a non-disruptive switchover to the new process.
 17. The apparatus as in claim 16, further comprising means for recording the identifier by a means for downloading.
 18. The apparatus as in claim 17, further comprising means for obtaining the identifier for a control process.
 19. The apparatus as in claim 16, wherein the means for instructing the previous process is accomplished with the control process.
 20. The apparatus as claim 19, wherein the means for instructing the previous process to perform the non-disruptive switchover to the new process further includes means for transmitting the identifier to the new process.
 21. The apparatus as in claim 20, further comprising means for sending signals from the previous process to the new process.
 22. The apparatus as in claim 21, wherein the signal requires updating a new process database.
 23. The apparatus as in claim 22, wherein the previous process continues to process and service signals received on a previous process queue.
 24. The apparatus as in claim 22, further comprising means for notifying the control process that the database has been transferred to the new process.
 25. The apparatus as in claim 24, further comprising the step of updating a lookup table with the identifier of the new process.
 26. The apparatus as in claim 24, further comprising means for forwarding any remaining messages to a new process queue, in response to the database being transferred.
 27. The apparatus as in claim 26, further including the step of processing signals by received by the new process queue.
 28. The apparatus as in claim 26, further including the step of deleting the previous process from memory.
 29. The apparatus as in claim 22, wherein the signal requiring updating the new process database is not upgraded and remains approximately the same.
 30. An apparatus for loading code non-disruptively, comprising: an identifier generator that generates an identifier for a new process, wherein the new process includes an endpoint, similar if not identical to the end point of the process it will replace; a memory device linked to the operating system, wherein the memory device receives the new process; a lookup table that includes the identifier and the endpoint of the new process, wherein the lookup table is communication with the operating system; and a controller in communication with the memory device, wherein the controller informs a previous process to perform a non-disruptive switchover to the new process.
 31. The apparatus as in claim 30, further comprising a downloader in linked to the memory device, wherein the new process is received by the downloader and placed in the memory device.
 32. The apparatus as in claim 30, further comprising a signal sent by the previous process to the new process.
 33. The apparatus as in claim 32, wherein the signal includes the database of the previous process.
 34. The apparatus as in claim 32, wherein the signal includes the identifier of the new process.
 35. The apparatus as in claim 33, further comprising a lookup table linked to the operating system, wherein the lookup table include the identifier.
 36. The apparatus as in claim 35, wherein the controller updates the lookup table with the identifier of the new process.
 37. The apparatus as in claim 30, wherein the new process is an interrupt handler.
 38. The apparatus as in claim 37, wherein the interrupt handler is upgraded. 